#!/bin/sh

#http://rpmfusion.org/Configuration
#1.Determining your card model
#/sbin/lspci | grep VGA

#GeForce 6 and newer
#yum install kmod-nvidia-PAE (or kmod-nvidia if not using kernel-PAE)
#yum install akmod-nvidia-PAE (or akmod-nvidia if not using kernel-PAE)
#
#GeForce 5 (FX series)
#yum install kmod-nvidia-173xx-PAE
#
#GeForce 2 through GeForce 4
#yum install kmod-nvidia-96xx-PAE
#
#Older For Fedora 9 and older, you can do:
#yum install kmod-nvidia-legacy

#Fedora 14, 15 and 16:
#su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'
#
#VDPAU/VAAPI
#In order to enable video acceleration support for your player and if your nvidia card is recent enough (Geforce 8 and later is needed). You can install theses packages:
#
## yum install vdpauinfo vdpau-video-freeworld libva-freeworld-utils libva-freeworld
#With the native vdpau backend from a nvidia card, the output is similar to this:
#
#$ vdpauinfo 
#display: :0.0   screen: 0
#API version: 1
#Information string: NVIDIA VDPAU Driver Shared Library  280.13  Wed Jul 27 17:15:20 PDT 2011
#...
#Here is an example of an accurate output of vainfo, when the bridge to the VAAPI is correctly installed.
#
#$ vainfo 
#libva: libva version 0.32.0
#Xlib:  extension "XFree86-DRI" missing on display ":0.0".
#libva: va_getDriverName() returns 0
#libva: Trying to open /usr/lib64/dri/nvidia_drv_video.so
#libva: va_openDriver() returns 0
#vainfo: VA API version: 0.32
#vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.3
#vainfo: Supported profile and entrypoints
#...
#Akmods
#An akmod is a type of package similar to dkms. As you start your computer, the akmod system will check if there are any missing kmods and if so, rebuild a new kmod for you. Akmods have more overhead than regular kmod packages as they require a few development tools such as gcc and automake in order to be able to build new kmods locally. If you think you'd like to try akmods, simply replace kmod with akmod in the instructions above and run them again. For example, kmod-nvidia-96xx becomes akmod-nvidia-96xx. Akmods are fully compatible with regular kmods, so you can switch between the two or even use both at once without any problems.
#
#Nouveau compatibility
#As nouveau is enabled by default starting with Fedora 11, you may experience problem which is caused by the nouveau kernel module being present in the initrd image. After the reboot, this command should not output anything:
#
#lsmod |grep nouveau
#Troubleshooting
#If you're experiencing problems with the drivers (in particular, lack of 3D after using nvidia-xconfig or nvidia-settings), try executing these commands:
#
#nvidia-config-display disable
#nvidia-config-display enable
#This will re-configure xorg.conf for use with the RPM Fusion drivers. 
#NOTE: Replace nvidia-config-display with nvidia-96xx-config-display OR nvidia-173xx-config-display as needed.
#
#Disable or uninstall the nvidia driver
#It is possible to disable the driver without uninstalling the nvidia package.
#
#
#nvidia-config-display disable
#rm /etc/X11/xorg.conf
#NOTE: Replace nvidia-config-display with nvidia-96xx-config-display OR nvidia-173xx-config-display as needed.
#
#Or you can switch the Driver field from nvidia to nouveau in /etc/X11/xorg.conf You also need to verify that /boot/grub/grub.conf doesn't contain nomodeset or rdblacklist=nouveau anymore.
#
#Then you will need to reboot. (or switch to init3 and manually unloading/loading modules.).
#
#Once done, if you really want to uninstall the driver:
#
#yum remove xorg-x11-drv-nvidia\* livna-config-display

yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

yum install akmod-nvidia vdpauinfo vdpau-video-freeworld libva-freeworld-utils libva-freeworld

#/etc/X11/xorg.conf: nvidia/nouveau
#/boot/grub/grub.conf doesn't contain nomodeset or rdblacklist=nouveau anymore

#yum groupinstall "GNOME Desktop Environment"

#config grub2
#edit /etc/default/grub
#grub2-mkconfig -o /boot/grub2/grub.cfg
